package com.mdxx.xczd.ui.model;

import com.mdxx.xczd.api.ApiManage;
import com.mdxx.xczd.base.baserx.RxSchedulers;
import com.mdxx.xczd.bean.UserBeanResult;
import com.mdxx.xczd.ui.contract.LoginContract;
import com.mdxx.xczd.utils.NetworkUtil;

import rx.Observable;

/**
 * Created by MD-02 on 2017/1/13.
 */


public class LoginModel implements LoginContract.Model{

    @Override
    public Observable<UserBeanResult> getLoginData(String username, String password) {
        return ApiManage.getInstence().getApiService().login(NetworkUtil.getAndroid_id(),username,username,password)
                .compose(RxSchedulers.<UserBeanResult>io_main());
    }
}
